<div class="roles view">
<h2><?php  __('Rol');?></h2>
	<table<?php $i = 0; $class = ' class="altrow"';?>
>
		</tr>			<td<?php if ($i % 2 == 0) echo $class;?>><?php __('Id'); ?></td>
			<td<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $rol['Rol']['id']; ?>
			&nbsp;
		</td>
		</tr>		</tr>			<td<?php if ($i % 2 == 0) echo $class;?>><?php __('Nombre'); ?></td>
			<td<?php if ($i++ % 2 == 0) echo $class;?>>
			<?php echo $rol['Rol']['nombre']; ?>
			&nbsp;
		</td>
		</tr>	</table>
</div>
<div class="actions">
	<h3><?php __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Rol', true), array('action' => 'edit', $rol['Rol']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('Delete Rol', true), array('action' => 'delete', $rol['Rol']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $rol['Rol']['id'])); ?> </li>
		<li><?php echo $this->Html->link(__('List Roles', true), array('action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Rol', true), array('action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Usuarios', true), array('controller' => 'usuarios', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Usuario', true), array('controller' => 'usuarios', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Funciones', true), array('controller' => 'funciones', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Funcion', true), array('controller' => 'funciones', 'action' => 'add')); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php __('Related Usuarios');?></h3>
	<?php if (!empty($rol['Usuario'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Id'); ?></th>
		<th><?php __('Usuario'); ?></th>
		<th><?php __('Clave'); ?></th>
		<th><?php __('Persona Id'); ?></th>
		<th><?php __('Sw Activo'); ?></th>
		<th><?php __('Rol Id'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($rol['Usuario'] as $usuario):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $usuario['id'];?></td>
			<td><?php echo $usuario['usuario'];?></td>
			<td><?php echo $usuario['clave'];?></td>
			<td><?php echo $usuario['persona_id'];?></td>
			<td><?php echo $usuario['sw_activo'];?></td>
			<td><?php echo $usuario['rol_id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'usuarios', 'action' => 'view', $usuario['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'usuarios', 'action' => 'edit', $usuario['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'usuarios', 'action' => 'delete', $usuario['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $usuario['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Usuario', true), array('controller' => 'usuarios', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
<div class="related">
	<h3><?php __('Related Funciones');?></h3>
	<?php if (!empty($rol['Funcion'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Descripcion'); ?></th>
		<th><?php __('Cod Funcion'); ?></th>
		<th><?php __('Id'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($rol['Funcion'] as $funcion):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $funcion['descripcion'];?></td>
			<td><?php echo $funcion['cod_funcion'];?></td>
			<td><?php echo $funcion['id'];?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('View', true), array('controller' => 'funciones', 'action' => 'view', $funcion['id'])); ?>
				<?php echo $this->Html->link(__('Edit', true), array('controller' => 'funciones', 'action' => 'edit', $funcion['id'])); ?>
				<?php echo $this->Html->link(__('Delete', true), array('controller' => 'funciones', 'action' => 'delete', $funcion['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $funcion['id'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('New Funcion', true), array('controller' => 'funciones', 'action' => 'add'));?> </li>
		</ul>
	</div>
</div>
